import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import * as getters from './getters'

Vue.use(Vuex)
const state = {
  currentUrl: '',
  data: [{
    title: '地图',
    secondTitle: [{
      title: '地图属性',
      contents: [{
        path: '/map',
        name: '地图初始化',
        htmlUrl: '../../static/html/map/mapAttribute/map.html'
      },
      {
        path: '/flyto',
        name: '飞行特定位置',
        htmlUrl: '../../static/html/map/mapAttribute/flyto.html'
      },
      {
        path: '/setoverview',
        name: '设置鹰眼图',
        htmlUrl: '../../static/html/map/mapAttribute/setoverview.html'
      },
      {
        path: '/setOpacity',
        name: '设置地球背景色',
        htmlUrl: '../../static/html/map/mapAttribute/setOpacity.html'
      },
      {
        path: '/customserver',
        name: '添加自定义影像图',
        htmlUrl: '../../static/html/map/mapAttribute/customserver.html'
      },
      {
        path: '/cameramove',
        name: '监听相机变化',
        htmlUrl: '../../static/html/map/mapAttribute/cameramove.html'
      },
      {
        path: '/viewfix',
        name: '固定相机视角',
        htmlUrl: '../../static/html/map/mapAttribute/viewfix.html'
      },
      {
        path: '/clickGetLnglat',
        name: '获取点击坐标',
        htmlUrl: '../../static/html/map/mapAttribute/clickGetLnglat.html'
      }]
    }]
  },
  {
    title: '场景',
    secondTitle: [
      {
        title: '天气',
        contents: [{
          path: '/rain',
          name: '下雨',
          htmlUrl: '../../static/html/scene/rain.html'
        },
        {
          path: '/snow',
          name: '下雪',
          htmlUrl: '../../static/html/scene/snow.html'
        }
        ]
      }
    ]
  },
  {
    title: '工具',
    secondTitle: [
      {
        title: '添加工具',
        contents: [{
          path: '/toolCreate',
          name: '工具创建',
          htmlUrl: '../../static/html/map/tool/toolCreate.html'
        },
        {
          path: '/editfeature',
          name: '编辑要素',
          htmlUrl: '../../static/html/map/tool/editfeature.html'
        }
        ]
      },
      {
        title: '自定义绘制',
        contents: [{
          path: '/drawpolygon',
          name: '画面',
          htmlUrl: '../../static/html/map/tool/drawpolygon.html'
        },
        {
          path: '/drawline',
          name: '画线',
          htmlUrl: '../../static/html/map/tool/drawline.html'
        }
        ]
      }
    ]
  },
  {
    title: '图层管理',
    secondTitle: [
      {
        title: '图层操作',
        contents: [{
          path: '/layeradd',
          name: '添加图层',
          htmlUrl: '../../static/html/layer/layeradd.html'
        },
        {
          path: '/layerremove',
          name: '移除图层',
          htmlUrl: '../../static/html/layer/layerremove.html'
        }
        ]
      },
      {
        title: '查找图层',
        contents: [{
          path: '/getlayerbyname',
          name: '根据集合名称查找',
          htmlUrl: '../../static/html/layer/getlayerbyname.html'
        }
        ]
      }
    ]
  },
  {
    title: '覆盖物',
    secondTitle: [
      {
        title: '添加插值',
        contents: [{
          path: '/interpolation',
          name: '插值',
          htmlUrl: '../../static/html/interpolation/interpolation.html'
        }]
      },
      {
        title: '添加实体',
        contents: [
          {
            path: '/marker',
            name: '添加标记',
            htmlUrl: '../../static/html/entity/marker.html'
          },
          {
            path: '/label',
            name: '添加标牌',
            htmlUrl: '../../static/html/entity/label.html'
          },
          {
          path: '/polygon',
          name: '添加单个实体',
          htmlUrl: '../../static/html/entity/polygon.html'
        },
        {
          path: '/combinepolygon',
          name: '添加组合实体',
          htmlUrl: '../../static/html/entity/combinepolygon.html'
        },
        {
          path: '/polygons',
          name: '海量实体添加',
          htmlUrl: '../../static/html/entity/polygons.html'
        },
        {
          path: '/combine',
          name: '添加组合图形',
          htmlUrl: '../../static/html/entity/combine.html'
        }]
      }
    ]
  },
  {
    title: '动态材质',
    secondTitle: [
      {
        title: '动态圆',
        contents: [{
          path: '/dynamiceclipse',
          name: '动态圆',
          htmlUrl: '../../static/html/dynamic/dynamiceclipse.html'
        }]
      }]
    },
  {
    title: '模型',
    secondTitle: [{
      title: '模型加载',
      contents: [{
        path: '/loadmodel',
        name: '加载单个模型',
        htmlUrl: '../../static/html/model/loadmodel.html'
      },
      {
        path: '/lodmodel',
        name: '添加多模型',
        htmlUrl: '../../static/html/model/lodmodel.html'
      },
      {
        path: '/modelbox',
        name: '添加模型包围盒',
        htmlUrl: '../../static/html/model/modelbox.html'
      }
      ]
    }]
  },
  {
    title: '模型操作',
    secondTitle: [{
      title: '模型',
      contents: [{
        path: '/modelmove',
        name: '模型移动',
        htmlUrl: '../../static/html/model/modelmove.html'
      },
      {
        path: '/modelposition',
        name: '模型位置细调',
        htmlUrl: '../../static/html/model/modelposition.html'
      }
      ]
    }]
  },
  {
    title: '裁剪',
    secondTitle: [
      {
        title: '模型裁剪',
        contents: [{
          path: '/modelclip',
          name: '裁剪模型',
          htmlUrl: '../../static/html/clip/modelclip.html'
        }
        ]
      },
      {
        title: '地球裁剪',
        contents: [{
          path: '/globeclip',
          name: '裁剪地球',
          htmlUrl: '../../static/html/clip/globeclip.html'
        }
        ]
      }
    ]
  },
  {
    title: '信息窗体',
    secondTitle: [{
      title: '模型信息',
      contents: [{
        path: '/model',
        name: '显示模型属性',
        htmlUrl: '../../static/html/info/model.html'
      },
      {
        path: '/modelattribute',
        name: '获取模型属性',
        htmlUrl: '../../static/html/info/modelattribute.html'
      }
      ]
    },
    {
      title: '实体信息',
      contents: [{
        path: '/entity',
        name: '显示实体属性',
        htmlUrl: '../../static/html/info/entity.html'
      }
      ]
    }]
  },
  {
    title: '网络请求',
    secondTitle: [{
      title: '请求类型',
      contents: [{
        path: '/post',
        name: 'post请求',
        htmlUrl: '../../static/html/request/post.html'
      },
      {
        path: '/get',
        name: 'get请求',
        htmlUrl: '../../static/html/request/get.html'
      }
      ]
    }]
  }]
}

export default new Vuex.Store({
  state,
  getters,
  mutations
})